package com.luckmgr.dto;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

import com.luckmgr.entity.db.LuckUser;
import com.luckmgr.entity.db.Prize;

public class RecordDTO {
	private LuckUser luckUser;
	private List<Prize> prizeList;
	private Lock lock = new ReentrantLock();
	
	public Integer sumConsumeNum(){
		Integer num = 0;
		for(Prize prize:prizeList){
			if(0!=prize.getConsumeNum()){
				num = num+1;
			}
			
		}
		return num;
	}
	
	
	public LuckUser getLuckUser() {
		return luckUser;
	}
	public void setLuckUser(LuckUser luckUser) {
		this.luckUser = luckUser;
	}
	public List<Prize> getPrizeList() {
		return prizeList;
	}
	public void setPrizeList(List<Prize> prizeList) {
		this.prizeList = prizeList;
	}

	public Lock getLock() {
		return lock;
	}

	public void setLock(Lock lock) {
		this.lock = lock;
	}
	
	
}
